<template>
<!-- 新歌单下的li 内容 -->
  <!-- <router-link class="rank-item" tag="li" :to="`${path}/${rank.id}`"> -->
  <router-link class="rank-item" tag="li" :to="`${path}/${rank.id}`">
    <img :src="rank.coverImgUrl" />
    <div class="dv-left">
        <p>{{rank.name}}</p>
        <ul>
            <li v-for="(art,i) in rank.tracks" 
            :key="i">{{i+1}}.{{art.first}}-{{art.second}}</li>
        </ul>
    </div> 
    <div class="dv-right"></div>
  </router-link>
</template>
<script>
export default {
   props:{
       rank:{  //song是对象
           type:Object,
           default:function(){
               return {}
           }
       },
       path:{
           type:String,
           default:"",
       }
   },
   created(){
   },
}
</script>
<style lang="less" scoped>
.rank-item {
    padding: 10px 0px;
    display: flex;
    margin-left: 12px;
    border-bottom: 1px solid rgb(235, 232, 232);
    position: relative;
    img {
        width: 100px;
        border-radius: 8px;
    }
    .dv-left {
        width: 60%;
        margin-left: 10px;
        p {
            font-size: 18px;
            line-height: 50px;
            // 文字多出隐藏样式
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
        }
        ul>li{
            font-size: 15px;
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
        }
    }
    .dv-right{
        width: 10%;
        height: 100px;
        position: absolute;
        right: 0px;  
        z-index: 2;
        color: gray;
        background:no-repeat url('../assets/image/arrow_icon.png');
        background-position: center center;

    }
}
</style>